class Task46:
    def run(self, n):
        n = str(n)
        if len(n) == 1:
            return 1
        elif len(n) == 2:
            if int(n) <= 25:
                return 2
            else:
                return 1
        else:
            p3 = 1
            if int(n[-2:]) <= 25:
                p2 = 2
            else:
                p2 = 1
            if int(n[-3:-1]) <= 25:
                p1 = p2 + p3
            else:
                p1 = p2
            for i in reversed(range(len(n) - 3)):
                p3 = p2
                p2 = p1
                if int(n[i : i + 2]) <= 25:
                    p1 = p2 + p3
                else:
                    p1 = p2
            return p1
